package com.xx.bysj.utils;


import com.xx.bysj.dto.HnUser;

public class UserHolder {
    // 线程变量
    private static final ThreadLocal<HnUser> tl = new ThreadLocal<>();

    public static void saveUser(HnUser user){
        tl.set(user);
    }

    public static HnUser getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
